home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / lang / Python151_Src.lha / Python1.5_Source / Include / thread.h < prev    next >
C/C++ Source or Header  |  1997-05-05  |  2KB  |  79 lines

  1. #ifndef _THREAD_H_included
  2. #define _THREAD_H_included
  3.  
  4. #define NO_EXIT_PROG        /* don't define exit_prog() */
  5.                 /* (the result is no use of signals on SGI) */
  6.  
  7. #ifndef Py_PROTO
  8. #if defined(__STDC__) || defined(__cplusplus)
  9. #define Py_PROTO(args)    args
  10. #else
  11. #define Py_PROTO(args)    ()
  12. #endif
  13. #endif
  14.  
  15. typedef void *type_lock;
  16. typedef void *type_sema;
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /* Macros defining new names for all these symbols */
  23. #define init_thread PyThread_init_thread
  24. #define start_new_thread PyThread_start_new_thread
  25. #define exit_thread PyThread_exit_thread
  26. #define _exit_thread PyThread__exit_thread
  27. #define get_thread_ident PyThread_get_thread_ident
  28. #define allocate_lock PyThread_allocate_lock
  29. #define free_lock PyThread_free_lock
  30. #define acquire_lock PyThread_acquire_lock
  31. #define release_lock PyThread_release_lock
  32. #define allocate_sema PyThread_allocate_sema
  33. #define free_sema PyThread_free_sema
  34. #define down_sema PyThread_down_sema
  35. #define up_sema PyThread_up_sema
  36. #define exit_prog PyThread_exit_prog
  37. #define _exit_prog PyThread__exit_prog
  38. #define create_key PyThread_create_key
  39. #define delete_key PyThread_delete_key
  40. #define get_key_value PyThread_get_key_value
  41. #define set_key_value PyThread_set_key_value
  42.  
  43.  
  44. void init_thread Py_PROTO((void));
  45. int start_new_thread Py_PROTO((void (*)(void *), void *));
  46. void exit_thread Py_PROTO((void));
  47. void _exit_thread Py_PROTO((void));
  48. long get_thread_ident Py_PROTO((void));
  49.  
  50. type_lock allocate_lock Py_PROTO((void));
  51. void free_lock Py_PROTO((type_lock));
  52. int acquire_lock Py_PROTO((type_lock, int));
  53. #define WAIT_LOCK    1
  54. #define NOWAIT_LOCK    0
  55. void release_lock Py_PROTO((type_lock));
  56.  
  57. type_sema allocate_sema Py_PROTO((int));
  58. void free_sema Py_PROTO((type_sema));
  59. int down_sema Py_PROTO((type_sema, int));
  60. #define WAIT_SEMA    1
  61. #define NOWAIT_SEMA    0
  62. void up_sema Py_PROTO((type_sema));
  63.  
  64. #ifndef NO_EXIT_PROG
  65. void exit_prog Py_PROTO((int));
  66. void _exit_prog Py_PROTO((int));
  67. #endif
  68.  
  69. int create_key Py_PROTO((void));
  70. void delete_key Py_PROTO((int));
  71. int set_key_value Py_PROTO((int, void *));
  72. void * get_key_value Py_PROTO((int));
  73.  
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77.  
  78. #endif
  79.